﻿@model IEnumerable<TimeReporting.Models.Project>
@{
    ViewBag.Title = "ProjectView";
}

<h2>Index</h2>


Project: 
@Html.DropDownList("projectTitle", String.Empty) 

<script type="text/javascript">
    $(document).ready(function () {
        $('#projectTitle').change(function () {
            //alert($(this).val());
            $.ajax({
            url: "Project/ProjectDetails/",
            type: 'GET',
            data: { input: $(this).val() },
            success: function (response) {

                $("#CurrentProjectData").html(response); 
            },
            error: function () {
                alert("error");
            }
        });

        });
    }); 
</script>

<p id="CurrentProjectData">
    <!-- The scripts generates this content !-->
    
     
</p>